package com.moshang.blog.controller.back.monitor;

import com.moshang.blog.core.annotation.SystemLog;
import com.moshang.blog.core.utils.SystemInfo;
import com.moshang.blog.information.Server;
import org.hyperic.sigar.Sigar;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Map;

/**
 *   @description: 服务器监控
 * @author xww
 * Created on 2019/4/11.
 */
@Controller
@RequestMapping("/back/monitor/server")
public class ServerMonitorController {
    private String prefix = "back/monitor/server";
    @GetMapping("list")
    @SystemLog("系统监控页面")
    public String list(Model model) throws Exception {
        Server server = new Server();
        server.copyTo();
        model.addAttribute("server", server);
        return prefix+"/list";
    }
}
